package com.itheima.boot.activemq.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Destination;

@Configuration
public class DestinationConfig {

    // 配置一个点对点的Destination
    @Bean(name = "queue")
    public Destination queue() {
        return new ActiveMQQueue("itheima-queue") ;
    }

    // 配置一个点对点的Destination
    @Bean(name = "topic")
    public Destination topic() {
        return new ActiveMQTopic("itheima-topic") ;
    }

}
